<%@include file="../context.jsp"%>
<script>
	var code = $("#ticker").val();
	var name = $("#companyName").val();

	if (code == null && code == '') {
		code = null;
	}
	if (name == null && name == '') {
		name = null;
	}

	updateCharts(true, 'container', 'currentPage', 'line', null, null, code,
			name);
</script>
<div id="contentDiv" class="tab-content">
	<div id="overview" class="tab-pane active">
		<div class="stock_screener_wrapper">
			<ul>
				Type
				<li><a class="candleChart" id="candleChart"
					href="javascript:void(0);">Candle</a></li>
				<li><a class="lineChart" id="lineChart"
					href="javascript:void(0);">Line</a></li>
			</ul>
			<ul>
				Range
				<li><a class="intradayChart" id="intradayChart"
					href="javascript:void(0);">Intraday</a></li>
				<li><a class="dailyChart" id="dailyChart"
					href="javascript:void(0);">Daily</a></li>
				<li><a class="weeklyChart" id="weeklyChart"
					href="javascript:void(0);">Weekly</a></li>
				<li><a class="monthlyChart" id="monthlyChart"
					href="javascript:void(0);">Monthly</a></li>
				<li><a class="yearlyChart" id="yearlyChart"
					href="javascript:void(0);">Yearly</a></li>
			</ul>
			<c:forEach begin="0" step="2" varStatus="status"
				end="${(fn:length(data.pageData)-1)}">
				<div class="row-fluid">
					<div class="stock_screener_wrapper_left span6">
						<h3>${data.pageData[status.index].substring(0, data.pageData[status.index].length()- 5)}.${data.pageData[status.index].substring(data.pageData[status.index].length()- 5, data.pageData[status.index].length())}</h3>
						<div id="container_${data.pageData[status.index] }"></div>
					</div>
					<c:if test="${(fn:length(data.pageData)-1) > 1}">
						<div class="stock_screener_wrapper_right span6">
							<h3>${data.pageData[status.index+1].substring(0, data.pageData[status.index+1].length()- 5)}.${data.pageData[status.index+1].substring(data.pageData[status.index+1].length()- 5, data.pageData[status.index+1].length())}</h3>
							<div id="container_${data.pageData[status.index+1] }"></div>
						</div>
					</c:if>
				</div>
			</c:forEach>
			<input type="hidden" id="currentPage" value="${data.currentPageNo}" />
		</div>
	</div>
	<!-- paging section -->
	<div class="pagination pagination-center">
		<ul>
			<c:if test="${data.showPrev}">
				<li><a lang="${data.currentPageNo-1}" id="showPrev"
					href="javascript:void(0);">Prev</a></li>
			</c:if>
			<c:forEach begin="${data.startPageNo}" var="page"
				end="${data.endPageNo}">
				<li><a
					<c:if test="${data.currentPageNo==page}">style="background-color:#79BAEC"</c:if>
					lang="${page}" id="pageNum_${page }" href="javascript:void(0);">${page}</a></li>
			</c:forEach>
			<c:if test="${data.showNext}">
				<li><a lang="${data.currentPageNo+1}" id="showNext"
					href="javascript:void(0);">Next</a></li>
			</c:if>
		</ul>
	</div>
	<!-- end pagination -->
</div>
